package com.tgr.shortLink.admin.common.convention.exception;

import com.tgr.shortLink.admin.common.convention.errorCode.BaseErrorCode;
import com.tgr.shortLink.admin.common.convention.errorCode.IErrorCode;

/**
 * 描述：
 * 作者：小陶不慌张
 * 文件：ServiceException
 * 日期：2023/12/22 19:06
 */

public class ServiceException extends AbstractException{
    public ServiceException(String message){
        this(message, null, BaseErrorCode.SERVICE_ERROR);
    }
    public ServiceException(IErrorCode errorCode){
        this(null,null,errorCode);
    }
    public ServiceException(String message, IErrorCode errorCode){
        this(message,null,errorCode);
    }
    public ServiceException(String message, Throwable throwable,IErrorCode errorCode){
        super(message,throwable,errorCode);
    }

    @Override
    public String toString(){
        return "ServiceException{"+
                "code='"+errorCode+"'"+
                "message'"+errorMessage+"'"+
                "}";
    }
}
